<?
require('../configuracion.php');
require('../db.php');

$query = " SELECT count(*) as total FROM tbl_UsuariosWeb; ";
$resTotal = mssql_query($query);
$rowTotal = mssql_fetch_object($resTotal);
$totalREGS = $rowTotal->total;

$query  = " SELECT count(*) as totHoy FROM tbl_UsuariosWeb ";
$query .= " WHERE (DATEDIFF(dd,dt_FechaRegistro,getdate()) = 0); ";
$resTotal = mssql_query($query);
$rowTotal = mssql_fetch_object($resTotal);
$totalHoy = $rowTotal->totHoy;

$query  = " SELECT     count(*) as totProds ";
$query .= " FROM tbl_UsuariosWeb INNER JOIN tbl_EvProductosUsuarioWeb ON ";
$query .= " tbl_UsuariosWeb.id_UsuarioWeb = tbl_EvProductosUsuarioWeb.id_UsuarioWeb ;";
$resTotal = mssql_query($query);
$rowTotal = mssql_fetch_object($resTotal);
$totalProds = $rowTotal->totProds;

$query  = " SELECT     count(*) as totHoy ";
$query .= " FROM tbl_UsuariosWeb INNER JOIN tbl_EvProductosUsuarioWeb ON ";
$query .= " tbl_UsuariosWeb.id_UsuarioWeb = tbl_EvProductosUsuarioWeb.id_UsuarioWeb ";
$query .= " WHERE (DATEDIFF(dd,tbl_EvProductosUsuarioWeb.dt_FechaRegistro,getdate()) = 0); ";
$resTotal = mssql_query($query);
$rowTotal = mssql_fetch_object($resTotal);
$totalProdsHoy = $rowTotal->totHoy;

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?= $instanciaECRM ?></title>
</head>

<body>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="headerLogoMobile.gif"></td>
  </tr>
  <tr>
    <td><font color="#666666" size="4"><strong>eCRM Mobile</strong></font></td>
  </tr>
  <tr>
    <td valign="bottom"><img src="icPgMonitor.gif"><strong>Monitor</strong></td>
  </tr>
</table>
<br>
<?=$Audiencias1 ?><br>
Hoy: <?=number_format($totalHoy) ?><br>
Total: <?=number_format($totalREGS) ?><br>
Productos<br>
Hoy: <?=number_format($totalProdsHoy) ?><br>
Total: <?=number_format($totalProds) ?><br><br>
<font color="#999999"><?= date("l, d/m/Y H:i:s") ?></font>
<br>
<br>
<img src="icArrowGo.gif">&nbsp;<a href="indexHomeMobile.html">Regresar</a><br>
<br>
</body>
</html>
